<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<%@include file="/WEB-INF/pages/include/prelude.jspf"%>
<%@include file="/WEB-INF/pages/include/common.jspf"%>
<link href="<c:url value='/static/css/distanceQuery.css' />" type="text/css" rel="stylesheet"/>
<title>里程查询</title>
<script type="text/javascript">
$(function(){
   	$("#pagetitle").html('里程查询');
   	tabs(".menu_ul", "active", ".conInfo");
});
function tabs(tabTit, on, tabCon) {
	$(tabCon).each(function() {
		$(this).children().eq(0).show();
	});
	$(tabTit).each(function() {
		$(this).children().eq(0).addClass(on);
		$(this).children().eq(0).css("background-color","#e51e25");
	});
	$(tabTit).children().click(function() {
		$(this).addClass(on).siblings().removeClass(on);
		$(this).css("background-color","#e51e25").siblings().css("background-color","#0000ff");
		var index = $(tabTit).children().index(this);		
		$(tabCon).children().eq(index).show().siblings().hide();
	});
	$(tabCon).children().eq(0).show().siblings().hide(); //加载时绑定默认选项卡
}
</script>
</head>
<body>
<div data-role="page">
	<%@include file="/WEB-INF/pages/include/header.jsp"%>
	<div data-role="content">
		<div class="fixedMenu">
			<ul class="menu_ul">
			 <li style="background-color:#e51e25;"><span id="conA">里程<br />概况</span></li>
			 <li style="background-color:#0000ff;"><span id="conB">航空<br />累计</span></li>
			 <li style="background-color:#0000ff;"><span id="conC">非航<br />累计</span></li>
			 <li style="background-color:#0000ff;"><span id="conD">航空<br />兑换</span></li>
			 <li style="background-color:#0000ff;"><span id="conE">非航<br />兑换</span></li>
			</ul>
		</div>
		<div class="conInfo">
			<div class="conA">
				<p>您当前可用里程为${point1Value }公里。</p>
				<p>本月作废里程${expireMileage }公里。</p>
				<p>${nextYear }年${nextMonth }月作废里程${nextExpireMileage }公里。</p>
				<p>${nextNextYear }年${nextNextMonth }月作废里程${nextNextExpireMileage }公里。</p>
				<br />
				<div class="conA_con">
					<div class="tl">前12个月定级里程信息</div>
					<c:if test="${statementCycleCode==0 }">
					<div class="li">里程累计：${statementCycleClubMiles }公里</div>
					<div class="li bot">定级航段：${statementCycleSegments }个</div>
					</c:if>
					<c:if test="${statementCycleCode!=0 }">
					<div class="li">${statementCycleMsg }</div>
					</c:if>
				</div>
			</div>
			<div class="conB">
				<div class="con_title">近一个月航空累计里程信息：</div>
				<ul class="con_li_two">
					<c:if test="${flightMileageQueryCode==0 }">
						<c:forEach items="${flightMileageQueryLoyTransactionList }" var="loyTransaction">
						<li>
							<p>${loyTransaction.transactionDate }，${loyTransaction.operatingCarrierCode }${loyTransaction.operatingFlight }</p>
							<p>${loyTransaction.originationAirport }-${loyTransaction.destinationAirport }，${loyTransaction.bookingClass }舱,累计${loyTransaction.marketingCarrierCode }公里</p>
						</li>
						</c:forEach>
						<c:if test="${fn:length(flightMileageQueryLoyTransactionList)<=0 }">
						<li>
							<p>暂无数据！</p>
						</li>
						</c:if>
					</c:if>
					<c:if test="${flightMileageQueryCode!=0}">
						<li>
							${flightMileageQueryMsg }
						</li>
					</c:if>
				</ul>
			</div>
			<div class="conC">
				<div class="con_title">近一个月非航累计里程信息：</div>
				<ul class="con_li_three">
					<c:if test="${nonAirMileageInquiryCode==0 }">
						<c:forEach items="${nonAirMileageInquiryLoyTransaction }" var="loyTransaction">
						<li>
							<p>活动日期：${loyTransaction.activityDate }</p>
							<p>${loyTransaction.partnerName }</p>
							<p>累计里程：${loyTransaction.locationName }公里</p>
						</li>
						</c:forEach>
						<c:if test="${fn:length(nonAirMileageInquiryLoyTransaction)<=0 }">
							<li><p>暂无数据！</p></li>
						</c:if>
					</c:if>
					<c:if test="${nonAirMileageInquiryCode!=0 }">
						<li>
							<p>${nonAirMileageInquiryMsg }</p>
						</li>
					</c:if>
				</ul>
			</div>
			<div class="conD">
				<div class="con_title">近一个月航空里程兑换信息：</div>
				<ul class="con_li_three">
				<c:if test="${airMileageExchangeCode!=0 }">
					<li>
						<p>${airMileageExchangeMsg }</p>
					</li>
				</c:if>
				<c:if test="${airMileageExchangeCode==0 }">
					<c:forEach items="${airMileageExchangeMapList }" var="airMileageExchangeMap">
						<li>
							<p><c:out value="${airMileageExchangeMap['TransactionDate'] }"></c:out>，<c:out value="${airMileageExchangeMap['PNRName'] }"></c:out></p>
							<p><c:out value="${airMileageExchangeMap['FlightNum'] }"></c:out>，<c:out value="${airMileageExchangeMap['Origination'] }"></c:out>-<c:out value="${airMileageExchangeMap['Destination'] }"></c:out></p>
							<p><c:out value="${airMileageExchangeMap['BookingClass'] }"></c:out>，消费<c:out value="${airMileageExchangeMap['Miles'] }"></c:out></p>
						</li>
					</c:forEach>
					<c:if test="${fn:length(airMileageExchangeMapList)<=0 }">
							<li><p>暂无数据！</p></li>
					</c:if>
				</c:if>
				</ul>
			</div>
			<div class="conE">
				<div class="con_title">近一个月非航里程兑换信息：</div>
				<ul class="con_li_three">
				<c:if test="${noAirMileageExchangeCode==0 }">
					<c:forEach items="${noAirMileageExchangeTxnList }" var="txn">
					<li>
						<p>消费日期：${txn.transactionDate }</p>
						<p>${txn.partnerCode }，${txn.product }</p>
						<p>消费里程：${txn.miles }公里</p>
					</li>
					</c:forEach>
					<c:if test="${fn:length(noAirMileageExchangeTxnList)<=0 }">
							<li><p>暂无数据！</p></li>
					</c:if>
				</c:if>
				<c:if test="${noAirMileageExchangeCode!=0 }">
					<li>
						<p>${noAirMileageExchangeMsg }</p>
					</li>
				</c:if>
				</ul>
			</div>
		</div>
	</div>
</div>
</body>
</html>